Imports System.Xml.Serialization

Public Class OnAction
    Inherits XEntityModelElementWithDocumentationBase

    ''' <summary>Initializes an instance of the <see cref="OnAction" /> class.</summary>
    ''' <param name="namespace">The <see cref="XNamespace" /> of the new element.</param>
    Public Sub New(ByVal [namespace] As XNamespace)
        MyBase.New("OnAction", [namespace].ToString())
    End Sub

    ''' <summary>Initializes an instance of the <see cref="OnAction" /> class.</summary>
    ''' <param name="other">An <see cref="System.Xml.Linq.XElement"/> object to copy from.</param>
    Public Sub New(ByVal other As XElement)
        MyBase.New(other)
    End Sub

    <XmlAttribute()> _
    Public Property Action() As Action
        Get
            Return GetEnumValueAttribute(GetType(Action), Me.Attribute(XName.Get("Action", MyBase.Name.NamespaceName)))
        End Get
        Set(ByVal value As Action)
            If (Me.Attribute(XName.Get("Action", MyBase.Name.NamespaceName)) Is Nothing) Then
                Me.Add(New XAttribute(XName.Get("Action", MyBase.Name.NamespaceName), ""))
            End If
            SetEnumValueAttribute(GetType(Action), Me.Attribute(XName.Get("Action", MyBase.Name.NamespaceName)), value)
        End Set
    End Property

End Class
